#!perl -T

use strict;
use warnings;
use Test::More tests => 5;
use Test::BoostUnit qw(:ALL);

my %h1 = (
ONE => 1,
TWO => 1,
THREE => 1,
FOUR => 1,
FIVE => 1,
SIX => 1,
SEVEN => 1,
);

my %h2 = (
ONE => 2,
TWO => 3,
THREE => 2,
FOUR => 0,
FIVE => 2,
SIX => 0,
SEVEN => 2,
);

my %h3 = (
ONE => 2,
TWO => 3,
THREE => 1,
FOUR => 1,
FIVE => 2,
SIX => 0,
SEVEN => 2,
);


my %h4 = (
ONE => 2,
TWO => 3,
THREE => 1,
FOUR => 1,
FIVE => 2,
SIX => 0,
SEVEN => 2,
EIGHT => 1,
NINE => 0,
);

is(matchTwoHashes({VECTOR1 => \%h1,VECTOR2 => \%h2}),0, "No Matches" );
is(matchTwoHashes({VECTOR1 => \%h1,VECTOR2 => \%h1}),1.0, "All Matches" );
is(matchTwoHashes({VECTOR1 => \%h1,VECTOR2 => \%h3}),(2/7), "2 out of 7 Matches" );
is(matchTwoHashes({VECTOR1 => \%h1,VECTOR2 => \%h4}),(2/7), "2 out of 7 Matches - extra keys" );
is(matchTwoHashes({VECTOR1 => \%h3,VECTOR2 => \%h4}),1.0, "All Matches - extra keys" );

